package 添加逗号;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        int n = s.length(), cnt = 0;
        StringBuilder str = new StringBuilder();
        for (int i = n - 1; i >= 0; i--) {
            str.append(s.charAt(i));
            cnt++;
            if (cnt % 3 == 0 && i != 0) {
                str.append(",");
            }
        }
        System.out.println(str.reverse());
    }
}
